%%%column1(consumerid)
%%%column2(dimension)
%%%column3(brandid)
%%%column4(pagesviewed)
%%%column5(duration)
%%%column6(jean)
%%%column7(prod_totprice)
%%%column8(hoh_most_educaiton)
%%%column9(household_size)
%%%column10(hoh_oldest_age)
%%%column11(household_income)
%%%column12(children)
tic %init=fminunc(@LL,rand(1,64));
options = optimset('Display','iter','MaxIter',10000,'MaxFunEvals',10000,'TolFun',1e-6,'TolX',1e-6,'GradObj','off');
%init=[-21.31 6.23 0.51 1.51 0.79 0.83 0.82 0.27 0.64 0.69 0.71 0.8 0.77 0.24 0.58 0.15 0.05 0.11 0.59 0.49 0.59 0.95 0.67 0.007 0.34 0.76 0.79 0.12 0.48 0.67 1.05 9.57 -0.32 0.40 0.24 0.55 0.657 0.72 0.80 0.61 0.01 0.11 0.85 0.43 0.451 0.27 0.3 0.61 0.94 0.27 0.93 0.90 0.69 0.65 0.78 0.47 0.52 0.54 0.29 0.58 0.31 0.07 0.08 0.42];
[theta,fval,exitflag,output,grad,hessian] = fminunc(@LL,rand(1,64),options);
SE=sqrt(diag(inv(hessian)));
toc